import http from "@/utils/http.js"

const url = {
    /****************** 排班接口 *********************/
    // 生成排班,按部门 起止时间 均为必填 depId,startTime,endTime
    workPlanBuildWorkPlan: "/workPlan/buildWorkPlan",
    // 导出调班记录
    workPlanExportAdjustmentRecord: "/workPlan/exportAdjustmentRecord",
    // 导出排班记录
    workPlanExportUserWorkPlan: "/workPlan/exportUserWorkPlan",
    // 查询调班记录
    workPlanQueryAdjustmentRecordPage: "/workPlan/queryAdjustmentRecordPage",
    // 查询排班记录
    workPlanQueryUserWorkPlanPage: "/lab/workPlan/queryUserWorkPlanPage",
    // 调班 单人
    workPlanUpdateUserWorkPlan: "/workPlan/updateUserWorkPlan",

    /****************** 班次管理接口 *********************/
    // 新增班次
    workClassAddWorkClass: "/lab/workClass/addWorkClass",
    // 删除班次
    workClassDelWorkClass: "/lab/workClass/delWorkClass",
    // 查询班次
    workClassQueryWorkClass: "/lab/workClass/queryWorkClass",
    // 查询班次
    workClassQueryWorkTeamsDetail: "/lab/workClass/queryWorkClassDetail/",
    // 修改班次
    workClassUpdateWorkClass: "/lab/workClass/updateWorkClass",

    /****************** 班组管理接口 *********************/
    // 新增班组
    workteamsAddWorkTeams: "/lab/workteams/addWorkTeams",
    // 删除班组
    workteamsDelWorkTeams: "/lab/workteams/delWorkTeams",
    // 查询班组
    workteamsQueryWorkTeams: "/lab/workteams/queryWorkTeams",
    // 查询班组
    workteamsQueryWorkTeamsDetail: "/lab/workteams/queryWorkTeamsDetail/",
    // 修改班组
    workteamsUpdateWorkTeams: "/lab/workteams/updateWorkTeams",

    /****************** 操作记录接口 *********************/
    // 查询操作记录
    operationRecordsQueryOperationRecords: "/operationRecords/queryOperationRecords",
    // 查询操作记录
    operationRecordsQueryRecords: "/operationRecords/queryRecords/",

    /****************** 文件管理接口 *********************/
    // 自由排班
    flexibleUserWorkPlanBatch: "/lab/workPlan/flexibleUserWorkPlanBatch",
    // 自由排班记录
    queryFlexibleUserWorkPlanHis: "/lab/workPlan/queryFlexibleUserWorkPlanHis",

}

export default {
    url: url,
    /****************** 排班接口 *********************/
    // 生成排班,按部门 起止时间 均为必填 depId,startTime,endTime
    workPlanBuildWorkPlan(params) {
        return http.post(url.workPlanBuildWorkPlan, params)
    },
    // 导出调班记录
    workPlanExportAdjustmentRecord(params) {
        return http.export(url.workPlanExportAdjustmentRecord, params, 'post')
    },
    // 导出排班记录
    workPlanExportUserWorkPlan(params) {
        return http.export(url.workPlanExportUserWorkPlan, params, 'post')
    },
    // 查询调班记录
    workPlanQueryAdjustmentRecordPage(params) {
        return http.post(url.workPlanQueryAdjustmentRecordPage, params)
    },
    // 查询排班记录
    workPlanQueryUserWorkPlanPage(params) {
        return http.post(url.workPlanQueryUserWorkPlanPage, params)
    },
    // 调班 单人
    workPlanUpdateUserWorkPlan(params) {
        return http.post(url.workPlanUpdateUserWorkPlan, params)
    },

    /****************** 班次管理接口 *********************/
    // 新增班次
    workClassAddWorkClass(params) {
        return http.post(url.workClassAddWorkClass, params)
    },
    // 删除班次
    workClassDelWorkClass(params) {
        return http.post(url.workClassDelWorkClass, params)
    },
    // 查询班次
    workClassQueryWorkClass(params) {
        return http.post(url.workClassQueryWorkClass, params)
    },
    // 查询班次
    workClassQueryWorkTeamsDetail(params) {
        return http.post(url.workClassQueryWorkTeamsDetail + `${params.id}`)
    },
    // 修改班次
    workClassUpdateWorkClass(params) {
        return http.post(url.workClassUpdateWorkClass, params)
    },

    /****************** 班组管理接口 *********************/
    // 新增班组
    workteamsAddWorkTeams(params) {
        return http.post(url.workteamsAddWorkTeams, params)
    },
    // 删除班组
    workteamsDelWorkTeams(params) {
        return http.post(url.workteamsDelWorkTeams, params)
    },
    // 查询班组
    workteamsQueryWorkTeams(params) {
        return http.post(url.workteamsQueryWorkTeams, params)
    },
    // 查询班组
    workteamsQueryWorkTeamsDetail(params) {
        return http.post(url.workteamsQueryWorkTeamsDetail + `${params.id}`)
    },
    // 修改班组
    workteamsUpdateWorkTeams(params) {
        return http.post(url.workteamsUpdateWorkTeams, params)
    },

    /****************** 操作记录接口 *********************/
    // 操作记录
    operationRecordsQueryOperationRecords(params) {
        return http.post(url.operationRecordsQueryOperationRecords, params)
    },
    // 操作记录
    operationRecordsQueryRecords(params) {
        return http.post(url.operationRecordsQueryRecords + params.id)
    },

    /****************** 文件管理接口 *********************/

    // 自由排班
    flexibleUserWorkPlanBatch(params) {
        return http.post(url.flexibleUserWorkPlanBatch, params)
    },
    // 自由排班记录
    queryFlexibleUserWorkPlanHis(params) {
        return http.post(url.queryFlexibleUserWorkPlanHis, params)
    },

}